package org.example.wikwok.pojo;

import java.io.Serializable;

public class VideoInfo  implements Serializable {
    private static final long serialVersionUID = 1L;
    private Video video;
    private int likes;
    private int comments;
    private int collects;
    private User author;

    public VideoInfo(Video video, int likes, int comments, int collects, User author) {
        this.video = video;
        this.likes = likes;
        this.comments = comments;
        this.collects = collects;
        this.author = author;
        this.author.setPassword("无权限访问");
    }

    public Video getVideo() {
        return video;
    }

    public void setVideo(Video video) {
        this.video = video;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public int getComments() {
        return comments;
    }

    public void setComments(int comments) {
        this.comments = comments;
    }

    public int getCollects() {
        return collects;
    }

    public void setCollects(int collects) {
        this.collects = collects;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
        this.author.setPassword("无权限访问");
    }

    @Override
    public String toString() {
        return "VideoInfo{" +
                "video=" + video +
                ", likes=" + likes +
                ", comments=" + comments +
                ", collects=" + collects +
                ", author=" + author +
                '}';
    }
}
